package com.qian.apiserver.entity;

import com.yaowk.service.common.BaseEntity;
import com.yaowk.service.common.GeneratorNote;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;

@Getter
@Setter
@ToString
@DynamicInsert
@DynamicUpdate
@Entity
/**
 * 记赛纪录
 */
public class GmMatchRecord extends BaseEntity<Integer>{
    @GeneratorNote("投注筹码")
    private BigDecimal betting;
    @GeneratorNote("输赢筹码")
    private BigDecimal winChip;
    @GeneratorNote("时间")
    private Date time;

    @GeneratorNote("用户Id")
    @Column(insertable = false,updatable = false)
    private Integer userId;

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "userId")
    private GmUser user;

}
